<h1><{$xoops_pagetitle}></h1>

<{*
<a href="<{$smarty.const.XOOPS_URL}>/userinfo.php?uid=<{$currentUser->get("uid")}>"><{$smarty.const._MD_PM_LANG_PROFILE}></a>
&nbsp;&raquo;&raquo;&nbsp;<{$smarty.const._MD_PM_LANG_INBOX}>
<br /><br />
*}>

<{capture name="viewpmsg"}><{strip}>
  <{if !$total_messages}>
    <tr>
      <th class="even" colspan="6" style="text-align:center;"><{$smarty.const._MD_PM_MESSAGE_YOUDONTHAVE}></th>
    </tr>
  <{/if}>

  <{foreach name=viewpm item=pm from=$pmObjects}>
    <tr style="text-align:left;" class="<{cycle values="odd,even"}>">
      <td style="text-align:center; vertical-align:top;">
        <input type="checkbox" id="msg_id[]" name="msg_id[]" value="<{$pm->get("msg_id")}>" />
      </td>
      <td style="text-align:center; vertical-align:top;">
        <{if $pm->isRead()}>
          &nbsp;
        <{else}>
          <img src="<{$xoops_url}>/images/read.gif" alt="<{$smarty.const._MD_PM_LANG_NOTREAD}>" title="<{$smarty.const._MD_PM_LANG_NOTREAD}>" />
        <{/if}>
      </td>
      <td style="text-align:center; vertical-align:top;">
        <img src="<{$smarty.const.XOOPS_URL}>/images/subject/<{$pm->get('msg_image')|xoops_escape:link}>" alt='' />
      </td>
      <td style="vertical-align:middle;">
        <{$pm->get("from_userid")|xoops_user:"uname"}>
      </td>
      <td style="vertical-align:middle;">
        <a href="<{$xoops_url}>/readpmsg.php?msg_id=<{$pm->getShow('msg_id')}>"><{$pm->getShow('subject')}></a>
      </td>
      <td style="text-align:center; vertical-align:middle;">
        <{$pm->get("msg_time")|xoops_formattimestamp:l}>
      </td>
    </tr>
  <{/foreach}>

  <{if $total_messages}>
    <tr style="text-align:left;">
      <td class="foot" colspan="6">
        <input type="button" class="formButton" onclick="javascript:openWithSelfMain('<{$smarty.const.XOOPS_URL}>/pmlite.php?send=1','pmlite',480,400);" value="<{$smarty.const._MD_PM_LANG_SEND}>" />
        &nbsp;
        <input type="submit" class="formButton" name="delete_messages" value="<{$smarty.const._MD_PM_LANG_DELETE}>" />
      </td>
    </tr>
  <{else}>
    <tr style="text-align:left;">
      <td class="foot" colspan="6">
        <input type="button" class="formButton" onclick="javascript:openWithSelfMain('<{$xoops_url}>/pmlite.php?send=1','pmlite',480,400);" value="<{$smarty.const._MD_PM_LANG_SEND}>" />
      </td>
    </tr>
  <{/if}>
<{/strip}><{/capture}>


<form name="prvmsg" method="post" action="<{$xoops_url}>/viewpmsg.php?action=delete">
<div class="skip"><{xoops_token form=$actionForm}></div>

<script type="text/javascript">
<!--
    document.write('<table border="0" cellspacing="1" cellpadding="4" width="100%" class="outer">') ;
    document.write('<thead>') ;
    document.write('  <tr class="head" style="text-align:center;" valign="middle">') ;
    document.write('    <th style="width:2%;"><input name="allbox" id="allbox" onclick=\'xoopsCheckAll("prvmsg", "allbox");\' type="checkbox" value="Check All" /></th>') ;
    document.write('    <th class="head" style="width:5%;"><img src="<{$xoops_url}>/images/download.gif" alt="" border="0" /></th>') ;
    document.write('    <th class="head" style="width:5%;">&nbsp;</th>') ;
    document.write('    <th class="head" style="width:10%;"><{$smarty.const._MD_PM_LANG_FROM}></th>') ;
    document.write('    <th class="head"><{$smarty.const._MD_PM_LANG_SUBJECT}></th>') ;
    document.write('    <th class="head" style="width:25%;"><{$smarty.const._MD_PM_LANG_DATE}></th>') ;
    document.write('  </tr>') ;
    document.write('</thead>') ;
    document.write('<{$smarty.capture.viewpmsg|replace:"'":"\'"}>') ;
    document.write('</table>') ;
//-->
</script>
<noscript>
<table border="0" cellspacing="1" cellpadding="4" width="100%" class="outer">
<thead>
  <tr class="head" style="text-align:center;" valign="middle">
    <th class="head" style="width:5%;" colspan="2"><img src="<{$xoops_url}>/images/download.gif" alt="" border="0" /></th>
    <th class="head" style="width:5%;">&nbsp;</th>
    <th class="head" style="width:10%;"><{$smarty.const._MD_PM_LANG_FROM}></th>
    <th class="head"><{$smarty.const._MD_PM_LANG_SUBJECT}></th>
    <th class="head" style="width:25%;"><{$smarty.const._MD_PM_LANG_DATE}></th>
  </tr>
</thead>
<{$smarty.capture.viewpmsg}>
</table>
</form>
</noscript>

<div style="text-align:center;"><{xoops_pagenavi pagenavi=$pageNavi}></div>
